/* eslint-disable */
<template>
  <div class="passenger-select2">
    <el-form ref="form" :model="form" label-width="88px" size="mini">
      <el-form-item label="统计类别">
        <el-radio-group v-model="radio2" @change="onRadioChange2">
          <el-radio-button
            v-for="item in Typelist"
            :key="item.value"
            :label="item.value"
          >{{item.lable}}</el-radio-button>
        </el-radio-group>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
/* eslint-disable */
export default {
  name: "foottype",
  data() {
    return {
      form: {},
      radio2: "-1",
      search: "search",
      suoyou: {
        lable: "所有",
        value: "-1"
      },
      Typelist: [],
      date: {
        marketId: 1,
        startDate: "2019-07-15",
        endDate: "2020-07-15",
        businessType: -1,
        perPage: 5,
        page: 1
      }
    };
  },
  created() {},
  mounted() {
    // this.getSearch();
    this.Typelist = JSON.parse(sessionStorage.getItem("Typelist"));
    this.fn();
  },
  methods: {
    // getSearch() {
    //   this.$store
    //     .dispatch("marketInfoMge/getSearch", { keyword: this.search })
    //     .then(data => {
    //       console.log(data);
    //       //   this.Typelist=data.backendBusinessType
    //       let dataarr = [];
    //       for (let i = 0; i < data.backendBusinessType.length; i++) {
    //         dataarr.push({
    //           value: data.backendBusinessType[i].id,
    //           lable: data.backendBusinessType[i].name
    //         });
    //       }
    //       this.Typelist = dataarr;
    //       this.Typelist.unshift(this.suoyou);
    //       console.log(this.Typelist);
    //     })
    //     .catch(err => {
    //       console.log(err);
    //     });
    // },
    onRadioChange2(val) {
      // console.log(val);
      this.date.businessType = val;
      // this.getstatisbusiness();
      this.fn();
    },
    fn() {
      this.$emit("listenEvent", this.date);
    }
  }
};
</script>

<style lang="scss" scoped>
::v-deep .el-radio-button__inner,
::v-deep .el-radio-button:last-child .el-radio-button__inner {
  border: none;
  border-radius: 0px;
}
::v-deep .el-radio-button:first-child .el-radio-button__inner {
  border: none;
  border-radius: 0px;
}
::v-deep .el-radio-button {
  margin-right: 40px;
}
.passenger-select2 {
  margin-top: 8px;
}
.passenger-select2 ::v-deep .el-radio-button {
  margin-right: 15px;
}
::v-deep .el-radio-button--mini .el-radio-button__inner {
  font-size: 13px;
  font-weight: 400;
}
::v-deep .el-radio-button__inner {
  color: #444;
}
</style>